﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<nelech.Models.DBModel.Place>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    רשימת מקומות
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">

    <script>
    function OnLoad() {
    }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        רשימת מקומות</h2>
       <table>
        <tr>
            <th>
            </th>
            <th>
                מס'
            </th>
            <th>
                שם המקום
            </th>
        </tr>
        <% foreach (var item in     Model)
           { %>
        <tr>
            <td>
                <%= Html.ActionLink("עריכה", "EditPlace", new { id=item.id }) %>
                |
                <%= Html.ActionLink("למיחזור", "RecyclePlace", new { id = item.id })%>
                |
                <%= Html.ActionLink("תצוגה", "PlaceInfo", "Place", new { id = item.id }, new object())%>
            </td>
            <td>
                <%= Html.Encode(item.id) %>
            </td>
            <td>
                <%= Html.Encode(item.name) %>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
   
        <%= Html.ActionLink("צור מקום חדש", "CreatePlace") %>
    <%= Html.ActionLink("לסל מיחזור", "RecycleBinPlace") %>
    <%= Html.ActionLink("מומלצים", "ListRecommendedPlace") %>
    </p>
</asp:Content>
